
↑ Solidot Technology Integrated Serial Interface Gateway PN4-GW2MR
When using the gateway product, the master control word and command status word will be enabled to know whether the command has been issued. After enabling, the PLC mapping data area will be offset, and there will be incorrect transmission and reception when reading or writing data. The following is a demonstration of how the data area address is offset after enabling the control word and status word:
1. Configure 2 read holding register commands under the configuration tool PORT1 port
Command 1: Function code 3, starting address 0, number of registers 2, memory mapping starting address 0
Command 2: Function code 3, starting address 3, number of registers 2, memory mapping starting address 4

2. Check the PN4-GW2MR I/O mapping address
I: IB200~IB231
Q: QB100~QB103

3. Write 1234 to register 0 and 5678 to register 3 in Modbus Salve modulation assistant

[Case 1] When the master station control word and command status word are not enabled, the address corresponds to the following:
Command 1: Memory mapping address 0 corresponds to PLC address IB200, and 1234 data is stored in IB200 B201
Command 2: Memory mapping address 4 corresponds to PLC address IB204, and 5678 data is stored in IB204 In IB205

[Case 2] When the master control word and command status word are enabled, the corresponding addresses are as follows:

QB100 is set to 1, the master is enabled, and data reading and sending are executed.
The command status word occupies 1 word, and the feedback is in the first word of the PLC I area address IB200 IB201. Both commands are executed and the feedback is 16#03. If there are 3 commands, 16#07 is displayed. The register feedback value is postponed by 1 word relative to the case where the control word status word is not enabled.
Not enabled: IB200-IB201 IB204-IB205
Enabled: IB202-IB203 IB206-IB207